//公共方法

const objectArraySort=(keyName) => {
    return function (objectN, objectM) {
     var valueN = objectN[keyName]
     var valueM = objectM[keyName]
     if (valueN > valueM) return 1
     else if (valueN < valueM) return -1
     else return 0
    }
}

export  default objectArraySort;